Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

241
Vistas
TypeError [INVALID_TYPE]: Supplied parameter is not a User nor a Role. But role is certainly supplied. Discorcd.js V13

So i am making a ticket system and i need a certain role to be able to look in the newly created channel but it keeps complaining i didn't supply a role even though i most definitely did.

I have tried the following:

await interaction.guild.roles.fetch()
let helperrol = await interaction.guild.roles.cache.find(role => role.id === 
       rolesAndChannels.helperRol);
let modrol = await interaction.guild.roles.cache.find(role => role.id === 
       rolesAndChannels.moderatorRol);

await interaction.guild.channels.create(kanaalmaaknaam, {
                type: 'text',
                parent: rolesAndChannels.ticketCatagorie,
                permissionOverwrites: [{
                    id: interaction.guild.id,
                    deny: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                },
                    {
                        id: interaction.user.id,
                        allow: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                    },
                    {
                        id: helperrol,
                        allow: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                    },
                    {
                        id: modrol,
                        allow: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                    },
                ],
            }).catch('Er is een fout opgetreden bij het maken van het text kanaal');

But I still get the error.

I have tried:

{
                        id: rolesAndChannels.moderatorRol,
                        allow: ['VIEW_CHANNEL', 'SEND_MESSAGES'],
                    },

Where rolesAndChannels.moderatorRol is the roleID but that results in the same error.

I have also tried to just supply the roleID directly but still same error.

I have enabled the partials intent if that's important.

Its a slash command.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The awnser was that I somehow copied the wrong ID's of the roles or something. I recopied the role ID's from the settings menu and that fixed the error.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda